package com.uduew.sjd.api;

import static com.uduew.sjd.config.Const.PRODUCT_INFO_LIST;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.uduew.sjd.bean.HttpBean;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestBodyStrategy;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.RequestBodyType;

import java.util.ArrayList;

public class ProductInfoApi implements IRequestApi, IRequestType {
    private ReqProductInfoBean euhedral;

    public ProductInfoApi() {
        this.euhedral = new ReqProductInfoBean();
    }


    @NonNull
    @Override
    public String getApi() {
        return PRODUCT_INFO_LIST;
    }

    /**
     * 获取参数的提交类型
     */
    @NonNull
    @Override
    public IRequestBodyStrategy getBodyType() {
        return RequestBodyType.JSON;
    }

    public static final class ReqProductInfoBean {
    }

    public static final class ResProductInfoBean extends HttpBean {
        private MamaguyBean mamaguy;

        public MamaguyBean getMamaguy() {
            return mamaguy;
        }
        private PailletteBean paillette;

        public PailletteBean getPaillette() {
            return paillette;
        }
    }
    public static final class PailletteBean {
        public int pretender;
        public int speedwell; //用户产品数(泰国越南，当前产品数量+订单产品数量，去重)
        public int wottest; //用户订单数(泰国越南)

        public int getSpeedwell() {
            return speedwell;
        }

        public int getWottest() {
            return wottest;
        }
    }

    public static final class MamaguyBean {
        public int faucial;
        public int curmudgeonly;
        public int moonstone;

        public int size;

        public int getSize() {
            return size;
        }

        public int prurience;

        public ArrayList<ThoroughBean> thorough;

        public ArrayList<ThoroughBean> getThorough() {
            return thorough;
        }

        public int getFaucial() {
            return faucial;
        }

        public int getCurmudgeonly() {
            return curmudgeonly;
        }

        public int getMoonstone() {
            return moonstone;
        }

        public int getPrurience() {
            return prurience;
        }
    }

    public static final class ThoroughBean implements Parcelable {
        private boolean isSelected;
        private String beastly;
        private String negligence;
        private String giglot;
        private int ichneumon;
        private double nuciform;
        private double tubulure;
        private double telegraphoscope;
        private double thralldom;
        private double taeniasis;
        private double pazz;
        private double seropurulent;
        private String vturvian;

        private String decorate;
        private String acinus;

        public ThoroughBean() {
        }

        private ThoroughBean(Parcel in) {
            isSelected = in.readByte() != 0;
            beastly = in.readString();
            negligence = in.readString();
            giglot = in.readString();
            ichneumon = in.readInt();
            nuciform = in.readDouble();
            tubulure = in.readDouble();
            telegraphoscope = in.readDouble();
            thralldom = in.readDouble();
            taeniasis = in.readDouble();
            pazz = in.readDouble();
            seropurulent = in.readDouble();
            vturvian = in.readString();
            decorate = in.readString();
            acinus = in.readString();
        }

        public static final Creator<ThoroughBean> CREATOR = new Creator<ThoroughBean>() {
            @Override
            public ThoroughBean createFromParcel(Parcel in) {
                return new ThoroughBean(in);
            }

            @Override
            public ThoroughBean[] newArray(int size) {
                return new ThoroughBean[size];
            }
        };

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }

        private ArrayList<QualitativeBean> qualitative;

        public String getBeastly() {
            return beastly;
        }

        public void setBeastly(String beastly) {
            this.beastly = beastly;
        }

        public String getNegligence() {
            return negligence;
        }

        public void setNegligence(String negligence) {
            this.negligence = negligence;
        }

        public String getGiglot() {
            return giglot;
        }

        public void setGiglot(String giglot) {
            this.giglot = giglot;
        }

        public int getIchneumon() {
            return ichneumon;
        }

        public double getNuciform() {
            return nuciform;
        }

        public String getNuciformStr() {

            return nuciform + "";
        }


        public double getTubulure() {
            return tubulure;
        }

        public double getTelegraphoscope() {
            return telegraphoscope;
        }

        public double getThralldom() {
            return thralldom;
        }

        public double getTaeniasis() {
            return taeniasis;
        }

        public double getPazz() {
            return pazz;
        }

        public double getSeropurulent() {
            return seropurulent;
        }

        public String getVturvian() {
            return vturvian;
        }

        public String getDecorate() {
            return decorate;
        }

        public String getAcinus() {
            return acinus;
        }

        @Override
        public String toString() {
            return "ThoroughBean{" +
                    "isSelected=" + isSelected +
                    ", beastly='" + beastly + '\'' +
                    ", negligence='" + negligence + '\'' +
                    ", giglot='" + giglot + '\'' +
                    ", ichneumon=" + ichneumon +
                    ", nuciform=" + nuciform +
                    ", tubulure=" + tubulure +
                    ", telegraphoscope=" + telegraphoscope +
                    ", thralldom=" + thralldom +
                    ", taeniasis=" + taeniasis +
                    ", pazz=" + pazz +
                    ", seropurulent=" + seropurulent +
                    ", vturvian='" + vturvian + '\'' +
                    ", decorate='" + decorate + '\'' +
                    ", acinus='" + acinus + '\'' +
                    ", qualitative=" + qualitative +
                    '}';
        }

        public ArrayList<QualitativeBean> getQualitative() {
            return qualitative;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(@NonNull Parcel parcel, int i) {
            parcel.writeByte((byte) (isSelected ? 1 : 0));
            parcel.writeString(beastly);
            parcel.writeString(negligence);
            parcel.writeString(giglot);
            parcel.writeInt(ichneumon);
            parcel.writeDouble(nuciform);
            parcel.writeDouble(tubulure);
            parcel.writeDouble(telegraphoscope);
            parcel.writeDouble(thralldom);
            parcel.writeDouble(taeniasis);
            parcel.writeDouble(pazz);
            parcel.writeDouble(seropurulent);
            parcel.writeString(vturvian);
            parcel.writeString(decorate);
            parcel.writeString(acinus);
        }
    }

    public static final class QualitativeBean {
        private String cpcu;
        private String superempirical;

        public String getCpcu() {
            return cpcu;
        }

        public String getSuperempirical() {
            return superempirical;
        }

    }

}

